package com.sh.service.impl;

import com.qiniu.common.QiniuException;
import com.sh.util.UploadImg;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import sh.dto.Response;
import sh.dto.ResultDto;

import java.io.IOException;
import java.util.UUID;

@Service
public class UploadImgService {

    public ResultDto upload(MultipartFile file) throws IOException {
        String string = UUID.randomUUID().toString();
        String upload = UploadImg.upload(file);
        return  Response.success(200,"上传文件成功",upload);
    }
}
